
class UserBean {
  int status;
  String msg;
  UserDataBean data;
  Map<String,dynamic> toJson()=>jsonFromUserBean(this);
  UserBean(Map<String,dynamic> json){
    jsonToUserBean(this,json);
  }
}

class UserDataBean {
  int id;
  String nick;
  String logo;
  String token;
  int phone;
  Map<String,dynamic> toJson()=>jsonFromUserDataBean(this);
  UserDataBean(Map<String,dynamic> json){
    jsonToUserDataBean(this,json);
  }
}


//////////////////////////////////////////////////////////////

//----------------------------解析方法-------------------------

/////////////////////////////////////////////////////////////



void jsonToUserBean(UserBean bean,Map<String,dynamic> json){
  if(json==null) return;
  bean.status=int.parse(json['status']?.toString()??'0');
  bean.msg=json['msg']?.toString()??'';
  bean.data=UserDataBean(json['data']);
}
void jsonToUserDataBean(UserDataBean bean,Map<String,dynamic> json){
  if(json==null) return;
  bean.id=int.parse(json['id']?.toString()??'0');
  bean.nick=json['nick']?.toString()??'';
  bean.logo=json['logo']?.toString()??'';
  bean.token=json['token']?.toString()??'';
  bean.phone=int.parse(json['phone']?.toString()??'0');
}
Map<String,dynamic> jsonFromUserBean(UserBean bean)=>{
  'status':bean.status,
  'msg':bean.msg,
  'data':bean.data,
};
Map<String,dynamic> jsonFromUserDataBean(UserDataBean bean)=>{
  'id':bean.id,
  'nick':bean.nick,
  'logo':bean.logo,
  'token':bean.token,
  'phone':bean.phone,
};
